#ifndef FM_STACK_H
#define FM_STACK_H

    #include<unistd.h>
    #include<types.h>

    #define FM_MAX_STACK 16 //max cache path numbers config 
    
    typedef struct fm_path_buff
    {
        char path[MAX_PATH_LEN+1];
        int flags;  
    }fm_path_buff_t;

    typedef struct fm_statck
    {
        struct fm_path_buff buff[FM_MAX_STACK];
        int top;    //point top free buff
        int bottom; //point bottom free buff
        int cur;    //point current buff 
        uint32_t records; //all records total number in stack
    }fm_records_t;

    int fm_records_init();
    int fm_records_set(char *path);
    int fm_records_back(char *path,int len);
    int fm_records_forward(char *path,int len);
    int fm_records_clear();
#endif